Ext.define('Admin.view.stats.QualityDataController', {
	        extend : 'Admin.app.BaseController',
	        alias : 'controller.qualitydata',

	        onExportClick : function() {
		        var table = this.getView();
		        table.saveDocumentAs({
			                type : 'excel',
			                title : table.pivotName,
			                author : 'SEQDATA',
			                fileName : table.pivotName + '.xml'
		                });
	        },

	        onRefreshDefault : function(view, record, params) {
		        var me = this, vm = me.getViewModel(), store = me.getStore('historyStore');

		        var interval = params && params.interval ? params.interval : vm.get('interval');
		        var queryDate = params && params.queryDate ? params.queryDate : vm.get('queryDate');
		        queryDate = Ext.Date.format(queryDate, 'Y-m-d');

		        store.getProxy().extraParams.date = queryDate;
		        store.getProxy().extraParams.interval = interval;
		        store.getProxy().extraParams.customer = me.getCr().data.id;
		        store.reload();
	        }

        });
